﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
/* This can be considered as the heart of our Models! This is the event Model where we create the Event and specify
 * it's privacy and we link it with it's template! We will talk about the template later in the template model
 * Each class contains create and modified times for security reasons
 */
namespace Fish.Models
{
    public class Events
    {
        public int ID { get; set; }

        [Required]
        [StringLength(100, MinimumLength = 2)]
        public string Name { get; set; }

        //0 = private 1=public
        [Display(Name = "Privacy Type")]
        [Required]
        public int PrivacyType { get; set; }

        [DataType(DataType.DateTime)]
        [ScaffoldColumn(false)]
        public DateTime Created { get; set; }

        [DataType(DataType.DateTime)]
        [ScaffoldColumn(false)]
        public DateTime Modified { get; set; }

        [Display(Name = "Template")]
        [Required]
        public int TemplatesID { get; set; }



        public virtual ICollection<EventUserRelations> EventUserRelations { get; set; }
        public virtual Templates Template { get; set; }

        public virtual ICollection<Supplies> Supplies { get; set; }
        public virtual ICollection<Transports> Transports { get; set; }
        public virtual ICollection<WallPosts> WallPosts { get; set; }

        public virtual IList<customizedString> customStrings { get; set; }

        public Events()
        {
            this.Created = DateTime.Now;
            this.Modified = DateTime.Now;
        }
    }
}